<?php
header("Content-Type: text/plain;charset=utf-8");
header("Access-Control-Allow-Origin:*");
header("Access-Control-Methods:POST,GET");

require_once("classes/skillOffer.php");

if (!isset($_GET["type"]) || empty($_GET["type"])) {
			echo "参数错误";
			return;
}

$type = $_GET["type"]; //获取前台传来的任务信息ID
$skillOffer = new SkillOffer();
$query = $skillOffer->getAllByType($type);
$result = mysqli_fetch_assoc($query);
echo json_encode($result,JSON_UNESCAPED_UNICODE);
?>